<template>
  <div id="foot">
    <ul class="foot-ul">
      <router-link tag="li" :to="{ path: '/msite', query: { geohash } }">
        <icon-svg icon-class="iconchangyonglogo401"></icon-svg>
        <p>外卖</p>
      </router-link>
      <li class="search">
        <icon-svg icon-class="iconsousuo"></icon-svg>
        <p>搜索</p>
      </li>
      <li class="order">
        <icon-svg icon-class="iconicon-dingdan"></icon-svg>
        <p>订单</p>
      </li>
      <router-link tag="li" to="/profile">
        <icon-svg icon-class="iconwode"></icon-svg>
        <p>我的</p>
      </router-link>
      <!-- <li class="profile" @click="gotoUrl('/profile')">
      <icon-svg icon-class="iconwode-active" v-if="$route.path.indexOf('/profile') !== -1"></icon-svg>
      <icon-svg icon-class="iconwode" v-else></icon-svg>
      <p>我的</p>
    </li> -->
    </ul>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  name: "foot",
  data() {
    return {};
  },
  computed: {
    ...mapState(["geohash"]),
  },
  components: {},
  created() {},
  mounted() {},
  methods: {
    gotoUrl(path) {
      this.$router.push(path);
    },
  },
};
</script>

<style lang="scss" scoped>
#foot {
  position: fixed;
  bottom: 0;
  left: 0;

  width: 100%;

  background-color: #fff;
}

.foot-ul {
  display: flex;
  justify-content: space-around;

  li {
    display: flex;
    align-items: center;
    flex-direction: column;

    p {
      font-size: .45rem;
    }
  }
}

.active {
  color: #1296db;

  p {
    color: #1296db;
  }
}

</style>
